import Vue from 'vue'
import Vuex from 'vuex'
import { getItem, setItem } from '@/utils/storage'

Vue.use(Vuex)
const TOKEN = 'BIGETOKEN'
export default new Vuex.Store({
	state: {
		token: getItem(TOKEN),
	},
	mutations: {
		setToken(state, data) {
			state.token = data
			setItem(TOKEN, state.token)
		},
	},
	actions: {},
	modules: {},
})
